<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .contain{
      height: 100px;
      width: 700px;
      background-color: aqua;
      margin: 0 auto;
      display: flex;
    }
    /* 方式一 在左侧有一个div时可以让他的基线为300 并不可以收缩 */
    /* .left{
      flex-basis: 300px;
      flex-shrink: 0;
    } */
    /* 方式二 当左侧没有元素时，就是让其margin-left 为300 */
    .item{
      margin-left: 300px;
      flex-grow: 1; 
      background-color: antiquewhite;
    }
    .wrap{
      border: 1px solid red;
    }
      /* 将一个元素设置成inline  左右margin生效  上下margin不生效 paddding生效 */
    .bottom{
      background-color: aqua;
      display: inline;
      margin: 10px;
      border: 1px solid black;
    }
  </style>
</head>
<body>
  <div class="contain">
    <div class="left"></div>
    <div class="item"></div>
  </div>
  <div class="wrap">
    <div>adgaegrargaljgarlgj</div>
  <div class="bottom">nihaodfha ja</div>daagadgadgafda
  <div>dafagagadfad</div>
  </div>
  
</body>
</html>